<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>POS收单运营管理平台</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"

	rel="stylesheet" />
<link href="<s:url value="/css/common.css"/>" type="text/css"
	rel="stylesheet" />
	
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
<script type='text/javascript' src='<s:url value="/dwr/engine.js"/>'></script>
<script type='text/javascript' src='<s:url value="/dwr/interface/MccQuery.js"/>'></script>
<style>
　　　
　　　　　a {
	text-decoration: none
}

　　　　　a:hover {
	color: red;
	text-decoration: none
}

a:VISITED {
	color: red;
}
　　


　　　
</style>
<style type="text/css">
.fieldError {
	color: red;
	text-align: left;
}

.error {
	float: none;
	color: red;
	padding-left: .5em;
	vertical-align: top;
}

table th {
	font-weight: bolder;
	text-align: left;
	background-color: #5599FF;
}
</style>

<script type="text/javascript">

   $(document).ready(function(){
      $("#sub").click(function(){
         var orgCode = $("#orgCode").val();
         if(orgCode == 99){
           alert("请选择机构");
           return false;
         } 
         var upload=$("#upload").val();
         if(upload == ''){
           alert("请选择文件");
           return false;
         }
      });
   });

   function loadOCode(){
        var orgCode = $("#orgCode").val();
		if (!orgCode) {
			return;
		}
		
		MccQuery.loadOCode(orgCode, function(sortSmall) {
			fillSelect_sort("accountNo", sortSmall);
		});
   }
	
	function fillSelect_sort(sid, address) {
	  		
				if (!address || !sid) {
					return;
				}
				var $select = $("#" + sid);
				$select.empty();
				
				
				for ( var i = 0; i < address.length; i++) {
					$select.append("<option value='"+address[i].CODE+"'>"
							+ address[i].NAME + "</option>");
					
				}
		}
</script>



</head>

<body>
     
	<div class="subpage">
		<s:form id="queryUserForm" action="/serialNumLeading/serialNumLeadingLeading.ct" method="post"
			theme="simple" enctype="multipart/form-data">
		<!-- 	<div class="user_title">
				<h2 class="headline-inquires">
					POS收单运营管理平台<br />
					<span class="sub-title"></span>
				</h2>
			</div> -->
			
			<table width="100%" cellpadding="0" cellspacing="0" border="0"
				class="table">
				<tr>
						<td colspan="4" align="center"><span style="font-color: red"><s:actionerror /></span>
							<span style="font-color: red;"><s:actionmessage /></span > <span style="font-color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
				<tr class="tb-line">
					<td colspan="4">&nbsp;<s:token></s:token></td>
				</tr>
				<tr class="tb-line">
				    <td class="tb-td"  colspan="4" align="center">
						<h2 class="headline-inquires">代理商基本信息</h2><font color="red">终端序列号批量分配（每次导入数据最大数为1000）</font>
					</td>
				</tr>
				<tr class="tb-line">
			    	<td align="right" class="tb-td" >
			    		<div class="tb-h4">账号：</div>
			        </td>
			        <td class="tb-td" >
			            <label class="tb-input-lengthen">
					  		<s:property value="#request.agent.accountNo"/>
					   		<s:hidden name="code" value="%{#request.agent.id}"/>
			            </label>
			        </td>
			    	<td align="right" class="tb-td" >
			    		<div class="tb-h4">姓名：</div>
			        </td>
			        <td class="tb-td" >
			            <label class="tb-input-lengthen">
				  			<s:property value="#request.agent.realName"/>
			            </label>
			        </td>
				 </tr>
				 <tr class="tb-line">
			    	<td align="right" class="tb-td" >
			    		<div class="tb-h4">性别：</div>
			        </td>
			        <td class="tb-td" >
			            <label class="tb-input-lengthen">
				  			<s:property value="#request.agent.sex"/>
			            </label>
			        </td>
			    	<td align="right" class="tb-td" >
			    		<div class="tb-h4">手机号：</div>
			        </td>
			        <td class="tb-td" >
			            <label class="tb-input-lengthen">
				  			<s:property value="#request.agent.mobile"/>
			            </label>
			        </td>
				 </tr>
				 <tr class="tb-line">
			    	<td align="right" class="tb-td" >
			    		<div class="tb-h4">角色类型：</div>
			        </td>
			        <td class="tb-td" >
			            <label class="tb-input-lengthen">
				  			<s:property value="#request.agent.roleType"/>
			            </label>
			        </td>
				   <s:if test="#session.session_merchant.roleType!=\"03\" && #session.session_merchant.roleType!=\"15\" && #session.session_merchant.roleType!=\"16\"">
						    
				    	<td align="right" class="tb-td" >
				    		<div class="tb-h4">所属机构：</div>
				        </td>
				        <td class="tb-td" >
				            <label class="tb-input-lengthen">
								  <s:property value="#request.agent.orgName"/>
				            </label>
				        </td>
					</s:if>
					<s:else>
						 <td></td> <td></td>
					</s:else>
				 </tr>
				 <tr class="tb-line">
			    	<td align="right" class="tb-td" >
			    		<div class="tb-h4">上级代理商：</div>
			        </td>
			        <td class="tb-td" >
			            <label class="tb-input-lengthen">
				  			<s:property value="#request.agent.superiorName"/>
			            </label>
			        </td>
			    	<td align="right" class="tb-td" >
			    		<div class="tb-h4">证件号：</div>
			        </td>
			        <td class="tb-td" >
			            <label class="tb-input-lengthen">
				  			<s:property value="#request.agent.cardNo"/>
			            </label>
			        </td>
				 </tr>
				 <tr class="tb-line">
			    	<td align="right" class="tb-td" >
			    		<div class="tb-h4">状态：</div>
			        </td>
			        <td class="tb-td" >
			            <label class="tb-input-lengthen">
				  			<s:property value="#request.agent.status"/>
			            </label>
			        </td>
					<td width="12%" style="min-width: 150px" align="right" class="tb-td">
		                <div class="tb-h4">品牌：</div></td>
					<td class="tb-td">
                		<label class="tb-select">
							<s:select cssClass="queryWidth" name="posInfo.posBrand"
								id="posBrand"
								list="#request.brandMap" listKey="key" listValue="value" 
								 headerKey="-1" headerValue="--请选择--"/>
						</label>
					</td>
				 </tr>
				<tr class="tb-line">
					<td>
						<div align="right" class="tb-h4">请选择文件</div>
					</td>
					<td>
						<s:file id="upload" name="upload"></s:file>
					</td>
					<td colspan="2">
						<s:if test=" #session.session_merchant.roleType!=\"16\"">
							<s:submit id="sub"  value="导入" />
						</s:if>
					</td>
				</tr>
			</table>
			
		</s:form>
			
	</div>
	<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>
